package com.cykj.service.impl;

import com.cykj.dto.ResponseDTO;
import com.cykj.entity.AdminDO;
import com.cykj.mapper.AdminMapper;
import com.cykj.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;
    @Override
    public ResponseDTO list() {
        List<AdminDO> list = adminMapper.list();
        System.out.println(list);
        if (list != null) {
            return ResponseDTO.success("查询成功", list);
        }
        return ResponseDTO.error("查询失败");
    }
}
